package com.iflytek.butterknife_framework_demo;

import android.app.Activity;

import java.lang.reflect.Method;

/**
 * @author: zhuozhang6
 * @date: 2021/9/8
 * @email: zhuozhang6@iflytek.com
 * @Description:
 */
public class ZzButterKnife {
    public static void bind(Activity activity) {
        String name = activity.getClass().getName() + "_ViewBinding";
        try {
            Class<?> aClass = Class.forName(name);
            IBinder iBinder = (IBinder) aClass.newInstance();
            iBinder.bind(activity);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

}
